package com.ruirenyun.util.annotation.validator;


import com.ruirenyun.entity.constant.SYS;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Created with IntelliJ IDEA.
 *
 * @author Deng Ye
 * @version 1.0
 * @date 2020/9/11
 * @description
 * @modifiedBy
 */
@Documented
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = NotEmptyValidator.class)
public @interface NotEmpty {
    String message() default "参数不能为空";

    SYS err() default SYS.VAL10001;

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
